home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume0 / awm / part02 < prev    next >
Encoding:
Internet Message Format  |  1988-08-08  |  55.8 KB

  1. Path: uunet!lll-winken!lll-tis!ames!vsi1!wyse!mikew
  2. From: mikew@wyse.wyse.com (Mike Wexler)
  3. Newsgroups: comp.sources.x
  4. Subject: v00i003:  Ardent Window Manager(X11), Part02/13
  5. Message-ID: <1622@wyse.wyse.com>
  6. Date: 8 Aug 88 20:24:11 GMT
  7. Sender: news@wyse.wyse.com
  8. Lines: 1844
  9. Approved: mikew@wyse.com
  10.  
  11. Submitted-by: jkh@ardent (Jordan Hubbard)
  12. Posting-number: Volume 0, Issue 3
  13. Archive-name: awm/part02
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then unpack
  17. # it by saving it into a file and typing "sh file".  To overwrite existing
  18. # files, type "sh file -c".  You can also feed this as standard input via
  19. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  20. # will see the following message at the end:
  21. #        "End of archive 2 (of 13)."
  22. # Contents:  awm/Beep.c awm/CircleDown.c awm/CircleUp.c awm/Error.c
  23. #   awm/Focus.c awm/Imakefile awm/Lower.c awm/Pause.c awm/XError.c
  24. #   awm/bitmaps/twm.twm.bm awm/errHndlr.c awm/exp_path.c awm/lex.l
  25. #   awm/menus/eventsave.c awm/menus/eventstack.c
  26. #   awm/menus/rtlmnu.ext.h awm/menus/std_defs.h
  27. # Wrapped by mikew@wyse on Mon Aug  8 12:01:41 1988
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f awm/Beep.c -a "${1}" != "-c" ; then 
  30.   echo shar: Will not over-write existing file \"awm/Beep.c\"
  31. else
  32. echo shar: Extracting \"awm/Beep.c\" \(2500 characters\)
  33. sed "s/^X//" >awm/Beep.c <<'END_OF_awm/Beep.c'
  34. X#ident   "%W% %G%"
  35. X
  36. X
  37. X
  38. X#ifndef lint
  39. Xstatic char *rcsid_Beep_c = "$Header: Beep.c,v 1.1 88/06/15 15:00:18 jkh Exp $";
  40. X#endif    lint
  41. X
  42. X#include "X11/copyright.h"
  43. X/*
  44. X *
  45. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  46. X *
  47. X * Copyright 1987 by Jordan Hubbard.
  48. X *
  49. X *
  50. X *                         All Rights Reserved
  51. X *
  52. X * Permission to use, copy, modify, and distribute this software and its
  53. X * documentation for any purpose and without fee is hereby granted,
  54. X * provided that the above copyright notice appear in all copies and that
  55. X * both that copyright notice and this permission notice appear in
  56. X * supporting documentation, and that the name of Ardent Computer
  57. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  58. X * pertaining to distribution of the software without specific, written
  59. X * prior permission.
  60. X *
  61. X */
  62. X
  63. X/*
  64. X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  65. X *
  66. X *                         All Rights Reserved
  67. X *
  68. X * Permission to use, copy, modify, and distribute this software and its
  69. X * documentation for any purpose and without fee is hereby granted,
  70. X * provided that the above copyright notice appear in all copies and that
  71. X * both that copyright notice and this permission notice appear in
  72. X * supporting documentation, and that the name of Digital Equipment
  73. X * Corporation not be used in advertising or publicity pertaining to
  74. X * distribution of the software without specific, written prior permission.
  75. X *
  76. X *
  77. X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  78. X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  79. X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  80. X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  81. X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  82. X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  83. X * SOFTWARE.
  84. X */
  85. X
  86. X
  87. X
  88. X/*
  89. X * MODIFICATION HISTORY
  90. X *
  91. X * 000 -- M. Gancarz, DEC Ultrix Engineering Group
  92. X */
  93. X
  94. X#ifndef lint
  95. Xstatic char *sccsid = "@(#)Beep.c    3.8    1/24/86";
  96. X#endif
  97. X
  98. X#include "awm.h"
  99. X
  100. XBoolean Beep(window, mask, button, x, y)
  101. XWindow window;                          /* Event window. */
  102. Xint mask;                               /* Button/key mask. */
  103. Xint button;                           /* Button event detail. */
  104. Xint x, y;                               /* Event mouse position. */
  105. X{
  106. X    Entry("Beep")
  107. X
  108. X    XBell(dpy, VOLUME_PERCENTAGE(Volume));
  109. X    Leave(FALSE)
  110. X}
  111. END_OF_awm/Beep.c
  112. if test 2500 -ne `wc -c <awm/Beep.c`; then
  113.     echo shar: \"awm/Beep.c\" unpacked with wrong size!
  114. fi
  115. # end of overwriting check
  116. fi
  117. if test -f awm/CircleDown.c -a "${1}" != "-c" ; then 
  118.   echo shar: Will not over-write existing file \"awm/CircleDown.c\"
  119. else
  120. echo shar: Extracting \"awm/CircleDown.c\" \(2650 characters\)
  121. sed "s/^X//" >awm/CircleDown.c <<'END_OF_awm/CircleDown.c'
  122. X#ident   "%W% %G%"
  123. X
  124. X
  125. X
  126. X#ifndef lint
  127. Xstatic char *rcsid_CircleDown_c = "$Header: CircleDown.c,v 1.1 88/06/15 15:21:21 jkh Exp $";
  128. X#endif    lint
  129. X
  130. X#include "X11/copyright.h"
  131. X/*
  132. X *
  133. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  134. X *
  135. X * Copyright 1987 by Jordan Hubbard.
  136. X *
  137. X *
  138. X *                         All Rights Reserved
  139. X *
  140. X * Permission to use, copy, modify, and distribute this software and its
  141. X * documentation for any purpose and without fee is hereby granted,
  142. X * provided that the above copyright notice appear in all copies and that
  143. X * both that copyright notice and this permission notice appear in
  144. X * supporting documentation, and that the name of Ardent Computer
  145. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  146. X * pertaining to distribution of the software without specific, written
  147. X * prior permission.
  148. X *
  149. X */
  150. X
  151. X/*
  152. X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  153. X *
  154. X *                         All Rights Reserved
  155. X *
  156. X * Permission to use, copy, modify, and distribute this software and its
  157. X * documentation for any purpose and without fee is hereby granted,
  158. X * provided that the above copyright notice appear in all copies and that
  159. X * both that copyright notice and this permission notice appear in
  160. X * supporting documentation, and that the name of Digital Equipment
  161. X * Corporation not be used in advertising or publicity pertaining to
  162. X * distribution of the software without specific, written prior permission.
  163. X *
  164. X *
  165. X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  166. X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  167. X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  168. X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  169. X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  170. X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  171. X * SOFTWARE.
  172. X */
  173. X
  174. X
  175. X
  176. X/*
  177. X * MODIFICATION HISTORY
  178. X *
  179. X * 000 -- M. Gancarz, DEC Ultrix Engineering Group
  180. X * 001 -- Loretta Guarino Reid, DEC Ultrix Engineering Group,
  181. X    Western Software Lab. Converted to X11.
  182. X */
  183. X
  184. X#ifndef lint
  185. Xstatic char *sccsid = "@(#)CircleDown.c    3.8    1/24/86";
  186. X#endif
  187. X
  188. X#include "awm.h"
  189. X
  190. XBoolean CircleDown(window, mask, button, x, y)
  191. XWindow window;                          /* Event window. */
  192. Xint mask;                               /* Button/key mask. */
  193. Xint button;                           /* Button event detail. */
  194. Xint x, y;                               /* Event mouse position. */
  195. X{
  196. X    Entry("CircleDown")
  197. X
  198. X    XCirculateSubwindowsDown(dpy, RootWindow(dpy, scr));
  199. X    Leave(FALSE)
  200. X}
  201. END_OF_awm/CircleDown.c
  202. if test 2650 -ne `wc -c <awm/CircleDown.c`; then
  203.     echo shar: \"awm/CircleDown.c\" unpacked with wrong size!
  204. fi
  205. # end of overwriting check
  206. fi
  207. if test -f awm/CircleUp.c -a "${1}" != "-c" ; then 
  208.   echo shar: Will not over-write existing file \"awm/CircleUp.c\"
  209. else
  210. echo shar: Extracting \"awm/CircleUp.c\" \(2632 characters\)
  211. sed "s/^X//" >awm/CircleUp.c <<'END_OF_awm/CircleUp.c'
  212. X#ident   "%W% %G%"
  213. X
  214. X
  215. X
  216. X#ifndef lint
  217. Xstatic char *rcsid_CircleUp_c = "$Header: CircleUp.c,v 1.1 88/06/15 15:21:23 jkh Exp $";
  218. X#endif    lint
  219. X
  220. X#include "X11/copyright.h"
  221. X/*
  222. X *
  223. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  224. X *
  225. X * Copyright 1987 by Jordan Hubbard.
  226. X *
  227. X *
  228. X *                         All Rights Reserved
  229. X *
  230. X * Permission to use, copy, modify, and distribute this software and its
  231. X * documentation for any purpose and without fee is hereby granted,
  232. X * provided that the above copyright notice appear in all copies and that
  233. X * both that copyright notice and this permission notice appear in
  234. X * supporting documentation, and that the name of Ardent Computer
  235. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  236. X * pertaining to distribution of the software without specific, written
  237. X * prior permission.
  238. X *
  239. X */
  240. X
  241. X/*
  242. X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  243. X *
  244. X *                         All Rights Reserved
  245. X *
  246. X * Permission to use, copy, modify, and distribute this software and its
  247. X * documentation for any purpose and without fee is hereby granted,
  248. X * provided that the above copyright notice appear in all copies and that
  249. X * both that copyright notice and this permission notice appear in
  250. X * supporting documentation, and that the name of Digital Equipment
  251. X * Corporation not be used in advertising or publicity pertaining to
  252. X * distribution of the software without specific, written prior permission.
  253. X *
  254. X *
  255. X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  256. X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  257. X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  258. X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  259. X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  260. X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  261. X * SOFTWARE.
  262. X */
  263. X
  264. X
  265. X
  266. X/*
  267. X * MODIFICATION HISTORY
  268. X *
  269. X * 000 -- M. Gancarz, DEC Ultrix Engineering Group
  270. X * 001 -- Loretta Guarino Reid, DEC Ultrix Engineering Group,
  271. X    Western Software Lab. Converted to X11.
  272. X */
  273. X
  274. X#ifndef lint
  275. Xstatic char *sccsid = "@(#)CircleUp.c    3.8    1/24/86";
  276. X#endif
  277. X
  278. X#include "awm.h"
  279. X
  280. XBoolean CircleUp(window, mask, button, x, y)
  281. XWindow window;                          /* Event window. */
  282. Xint mask;                               /* Button/key mask. */
  283. Xint button;                           /* Button event detail. */
  284. Xint x, y;                            /* Event mouse position. */
  285. X{
  286. X    Entry("CircleUp")
  287. X
  288. X    XCirculateSubwindowsUp(dpy, RootWindow(dpy, scr));
  289. X    Leave(FALSE)
  290. X}
  291. END_OF_awm/CircleUp.c
  292. if test 2632 -ne `wc -c <awm/CircleUp.c`; then
  293.     echo shar: \"awm/CircleUp.c\" unpacked with wrong size!
  294. fi
  295. # end of overwriting check
  296. fi
  297. if test -f awm/Error.c -a "${1}" != "-c" ; then 
  298.   echo shar: Will not over-write existing file \"awm/Error.c\"
  299. else
  300. echo shar: Extracting \"awm/Error.c\" \(2979 characters\)
  301. sed "s/^X//" >awm/Error.c <<'END_OF_awm/Error.c'
  302. X#ident   "%W% %G%"
  303. X
  304. X
  305. X
  306. X#ifndef lint
  307. Xstatic char *rcsid_Error_c = "$Header: Error.c,v 1.2 88/07/24 01:58:56 jkh Exp $";
  308. X#endif    lint
  309. X
  310. X#if defined(vax)
  311. X#include <sys/file.h>
  312. X#else
  313. X#include <fcntl.h>
  314. X#endif /* vax */
  315. X
  316. X#include <signal.h>
  317. X#include "X11/copyright.h"
  318. X/*
  319. X *
  320. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  321. X *
  322. X * Copyright 1987 by Jordan Hubbard.
  323. X *
  324. X *
  325. X *                         All Rights Reserved
  326. X *
  327. X * Permission to use, copy, modify, and distribute this software and its
  328. X * documentation for any purpose and without fee is hereby granted,
  329. X * provided that the above copyright notice appear in all copies and that
  330. X * both that copyright notice and this permission notice appear in
  331. X * supporting documentation, and that the name of Ardent Computer
  332. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  333. X * pertaining to distribution of the software without specific, written
  334. X * prior permission.
  335. X *
  336. X */
  337. X
  338. X/*
  339. X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  340. X *
  341. X *                         All Rights Reserved
  342. X *
  343. X * Permission to use, copy, modify, and distribute this software and its
  344. X * documentation for any purpose and without fee is hereby granted,
  345. X * provided that the above copyright notice appear in all copies and that
  346. X * both that copyright notice and this permission notice appear in
  347. X * supporting documentation, and that the name of Digital Equipment
  348. X * Corporation not be used in advertising or publicity pertaining to
  349. X * distribution of the software without specific, written prior permission.
  350. X *
  351. X *
  352. X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  353. X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  354. X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  355. X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  356. X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  357. X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  358. X * SOFTWARE.
  359. X */
  360. X
  361. X
  362. X
  363. X/*
  364. X * MODIFICATION HISTORY
  365. X *
  366. X * 000 -- M. Gancarz, DEC Ultrix Engineering Group
  367. X */
  368. X
  369. X#ifndef lint
  370. Xstatic char *sccsid = "@(#)Error.c    3.8    1/24/86";
  371. X#endif
  372. X
  373. X#include "awm.h"
  374. X
  375. Xextern Boolean desktop_execd;
  376. Xextern char execfile[];
  377. X
  378. X/*
  379. X * Default error reporting routine.  Called when a random awm error
  380. X * is encountered.
  381. X */
  382. XError(s)
  383. Xchar *s;    /* Error description string */
  384. X{
  385. X    Entry("Error")
  386. X
  387. X    fprintf(stderr, "awm: %s\n", s);
  388. X    if (!desktop_execd) {
  389. X     if (access(execfile, X_OK) == 0) {
  390. X          if (fork() == 0) {
  391. X           setpgrp(0, 0);
  392. X           signal(SIGHUP, SIG_IGN);
  393. X           signal(SIGQUIT, SIG_IGN);
  394. X           signal(SIGINT, SIG_IGN);
  395. X           execl("/bin/sh", "sh", "-c", execfile, 0);
  396. X           _exit(127);
  397. X          }
  398. X          else
  399. X           desktop_execd = TRUE;
  400. X     }
  401. X    }
  402. X    Cleanup();
  403. X    exit(1);
  404. X}
  405. X
  406. Xvoid Warning(s)
  407. Xchar *s;    /* Error description string */
  408. X{
  409. X    Entry("Warning")
  410. X
  411. X    fprintf(stderr, "awm: warning: %s\n", s);
  412. X    Leave_void
  413. X}
  414. END_OF_awm/Error.c
  415. if test 2979 -ne `wc -c <awm/Error.c`; then
  416.     echo shar: \"awm/Error.c\" unpacked with wrong size!
  417. fi
  418. # end of overwriting check
  419. fi
  420. if test -f awm/Focus.c -a "${1}" != "-c" ; then 
  421.   echo shar: Will not over-write existing file \"awm/Focus.c\"
  422. else
  423. echo shar: Extracting \"awm/Focus.c\" \(3223 characters\)
  424. sed "s/^X//" >awm/Focus.c <<'END_OF_awm/Focus.c'
  425. X#ident   "%W% %G%"
  426. X
  427. X
  428. X
  429. X#ifndef lint
  430. Xstatic char *rcsid_Focus_c = "$Header: Focus.c,v 1.2 88/07/02 02:21:26 jkh Exp $";
  431. X#endif    lint
  432. X
  433. X
  434. X#include "X11/copyright.h"
  435. X/*
  436. X *
  437. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  438. X *
  439. X * Copyright 1987 by Jordan Hubbard.
  440. X *
  441. X *
  442. X *                         All Rights Reserved
  443. X *
  444. X * Permission to use, copy, modify, and distribute this software and its
  445. X * documentation for any purpose and without fee is hereby granted,
  446. X * provided that the above copyright notice appear in all copies and that
  447. X * both that copyright notice and this permission notice appear in
  448. X * supporting documentation, and that the name of Ardent Computer
  449. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  450. X * pertaining to distribution of the software without specific, written
  451. X * prior permission.
  452. X *
  453. X */
  454. X
  455. X/*
  456. X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  457. X *
  458. X *                         All Rights Reserved
  459. X *
  460. X * Permission to use, copy, modify, and distribute this software and its
  461. X * documentation for any purpose and without fee is hereby granted,
  462. X * provided that the above copyright notice appear in all copies and that
  463. X * both that copyright notice and this permission notice appear in
  464. X * supporting documentation, and that the name of Digital Equipment
  465. X * Corporation not be used in advertising or publicity pertaining to
  466. X * distribution of the software without specific, written prior permission.
  467. X *
  468. X *
  469. X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  470. X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  471. X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  472. X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  473. X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  474. X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  475. X * SOFTWARE.
  476. X */
  477. X
  478. X
  479. X
  480. X/*
  481. X * MODIFICATION HISTORY
  482. X *
  483. X * 000 -- M. Gancarz, DEC Ultrix Engineering Group
  484. X * 001 -- Loretta Guarino Reid, DEC Ultrix Engineering Group,
  485. X    Western Software Lab. Converted to X11.
  486. X */
  487. X
  488. X#ifndef lint
  489. Xstatic char *sccsid = "@(#)Focus.c    3.8    1/24/86";
  490. X#endif
  491. X
  492. X#include "awm.h"
  493. X
  494. Xextern Window FocusWindow;
  495. X
  496. XBoolean Focus(window, mask, button, x, y)
  497. XWindow window;                /* Event window. */
  498. Xint mask;                /* Button/key mask. */
  499. Xint button;                /* Button event detail. */
  500. Xint x, y;                /* Event mouse position. */
  501. X{
  502. X     AwmInfoPtr awi;
  503. X
  504. X     Entry("Focus");
  505. X
  506. X     awi = GetAwmInfo(window);
  507. X     if (awi)
  508. X      window = awi->client;
  509. X     XSetInputFocus(dpy, window, RevertToPointerRoot, CurrentTime);
  510. X     if (window != RootWindow(dpy, scr))
  511. X      FocusSetByUser = TRUE;
  512. X     else
  513. X      FocusSetByUser = FALSE;
  514. X     FocusSetByWM = FALSE;
  515. X     FocusWindow = window;
  516. X     Leave(FALSE)
  517. X}
  518. X
  519. XBoolean UnFocus(window, mask, button, x, y)
  520. XWindow window;                /* Event window. */
  521. Xint mask;                /* Button/key mask. */
  522. Xint button;                /* Button event detail. */
  523. Xint x, y;                /* Event mouse position. */
  524. X{
  525. X     Entry("UnFocus");
  526. X
  527. X     XSetInputFocus(dpy, PointerRoot, None, CurrentTime);
  528. X     FocusSetByUser = FALSE;
  529. X     FocusSetByWM = FALSE;
  530. X     FocusWindow = RootWindow(dpy, scr);
  531. X     Leave(FALSE)
  532. X}
  533. X
  534. END_OF_awm/Focus.c
  535. if test 3223 -ne `wc -c <awm/Focus.c`; then
  536.     echo shar: \"awm/Focus.c\" unpacked with wrong size!
  537. fi
  538. # end of overwriting check
  539. fi
  540. if test -f awm/Imakefile -a "${1}" != "-c" ; then 
  541.   echo shar: Will not over-write existing file \"awm/Imakefile\"
  542. else
  543. echo shar: Extracting \"awm/Imakefile\" \(2744 characters\)
  544. sed "s/^X//" >awm/Imakefile <<'END_OF_awm/Imakefile'
  545. X       MENU_LIB = menus
  546. X      MENU_ARCH = $(MENU_LIB)/rtlmenu.a
  547. X     NEATEN_LIB = /grgr/neaten
  548. X    NEATEN_ARCH = $(NEATEN_LIB)/neaten.a
  549. X  SYS_LIBRARIES = -ll
  550. X      OTHERSRCS = gram.y lex.l
  551. X         YFLAGS = -d
  552. X         HFILES = awm.h neaten.def.h neaten.ext.h support.h
  553. X
  554. X# Add the line -DCONSOLE to the appropriate DEFINES macro (see below) if
  555. X# you want output (stderr and stdout) to go to the system console.
  556. X#
  557. X
  558. X# Use these macros if you want the RTL Neaten package.
  559. X# Also make sure that NEATEN_LIB points to the right place. See the README
  560. X# file for instructions (though you can just define this and give it a shot).
  561. X#       DEFINES = -DSYSFILE=\"$(AWMDIR)$(PATHSEP)system.awmrc\" -DNEATEN
  562. X#       LOCAL_LIBRARIES = $(NEATEN_ARCH) $(MENU_ARCH) $(XLIB)
  563. X
  564. X
  565. X# Use these macros if you don't want the RTL Neaten package.
  566. X        DEFINES = -DSYSFILE=\"$(AWMDIR)$(PATHSEP)system.awmrc\"
  567. X        LOCAL_LIBRARIES = $(MENU_ARCH) $(XLIB)
  568. X
  569. X# Define this if you're compiling XReadBitmapFileData with awm, rather
  570. X# than with Xlib. No guarantees that this will work with all source trees.
  571. X# To be totally sure, compile it with Xlib.
  572. X#XRDOBJ=XRdBitFD.o
  573. X
  574. X# Below is just for "make noident", remove it if you've moved XRdBitFD.c
  575. X# someplace else.
  576. XXRDSRC=XRdBitFD.c
  577. X
  578. X
  579. XSRCS=    globals.c Beep.c Bindings.c CircleDown.c CircleUp.c\
  580. X    Cursors.c Focus.c GetButton.c  GridBox.c Iconify.c Icons.c Lower.c\
  581. X    Menu.c Move.c MoveOpaque.c NewIconify.c Pause.c Push.c Error.c\
  582. X    Raise.c Refresh.c Resize.c Restart.c RubberBand.c StoreBox.c \
  583. X    StoreZap.c XError.c awm.c FocusChng.c Titlebar.c errHndlr.c \
  584. X    Grab.c menu_sup.c Gadget.c support.c exp_path.c Neaten.c
  585. X
  586. XOBJS=    gram.o lex.o globals.o Beep.o Bindings.o CircleDown.o CircleUp.o\
  587. X    Cursors.o Focus.o GetButton.o GridBox.o Iconify.o Icons.o Lower.o\
  588. X    Menu.o Move.o MoveOpaque.o NewIconify.o Pause.o Push.o Error.o\
  589. X    Raise.o Refresh.o Resize.o Restart.o RubberBand.o StoreBox.o \
  590. X    StoreZap.o XError.o awm.o FocusChng.o Titlebar.o errHndlr.o \
  591. X    Grab.o menu_sup.o Gadget.o support.o exp_path.o Neaten.o $(XRDOBJ)
  592. X
  593. XComplexProgramTarget(awm)
  594. X
  595. XInstallNonExec(system.awmrc, $(AWMDIR))
  596. X
  597. X$(MENU_ARCH)::
  598. X    @echo Making menu package...
  599. X    @(cd $(MENU_LIB); make CC=$(CC) CFLAGS="$(CFLAGS)")
  600. X    @echo done.
  601. X
  602. X$(NEATEN_ARCH)::
  603. X    cp Makefile.rtl $(NEATEN_LIB)/Makefile
  604. X    @echo Making Neaten package
  605. X    @(cd $(NEATEN_LIB); make -f Makefile)
  606. X    @echo done.
  607. X
  608. Xclean::
  609. X    @echo Cleaning menus...
  610. X    @(cd $(MENU_LIB); make clean)
  611. X    @echo done.
  612. X    rm -f y.tab.h
  613. X
  614. Xnoident::
  615. X    @echo Removing ident lines from awm...
  616. X    @for i in $(SRCS) $(OTHERSRCS) $(HFILES) $(XRDSRC); do \
  617. X    sed -e '/#ident/D' < $$i > /tmp/x.$$i && \
  618. X    mv /tmp/x.$$i $$i ; \
  619. X    done
  620. X    @(cd $(MENU_LIB); make noident)
  621. X    @echo done.
  622. X
  623. XXRdBitFD.o:
  624. X    $(CC) -c -I$(XLIBSRC) -I$(TOP) -I$(INCLUDESRC) XRdBitFD.c
  625. END_OF_awm/Imakefile
  626. if test 2744 -ne `wc -c <awm/Imakefile`; then
  627.     echo shar: \"awm/Imakefile\" unpacked with wrong size!
  628. fi
  629. # end of overwriting check
  630. fi
  631. if test -f awm/Lower.c -a "${1}" != "-c" ; then 
  632.   echo shar: Will not over-write existing file \"awm/Lower.c\"
  633. else
  634. echo shar: Extracting \"awm/Lower.c\" \(2761 characters\)
  635. sed "s/^X//" >awm/Lower.c <<'END_OF_awm/Lower.c'
  636. X#ident   "%W% %G%"
  637. X
  638. X
  639. X
  640. X#ifndef lint
  641. Xstatic char *rcsid_Lower_c = "$Header: Lower.c,v 1.1 88/06/15 15:21:32 jkh Exp $";
  642. X#endif    lint
  643. X
  644. X#include "X11/copyright.h"
  645. X/*
  646. X *
  647. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  648. X *
  649. X * Copyright 1987 by Jordan Hubbard.
  650. X *
  651. X *
  652. X *                         All Rights Reserved
  653. X *
  654. X * Permission to use, copy, modify, and distribute this software and its
  655. X * documentation for any purpose and without fee is hereby granted,
  656. X * provided that the above copyright notice appear in all copies and that
  657. X * both that copyright notice and this permission notice appear in
  658. X * supporting documentation, and that the name of Ardent Computer
  659. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  660. X * pertaining to distribution of the software without specific, written
  661. X * prior permission.
  662. X *
  663. X */
  664. X
  665. X/*
  666. X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  667. X *
  668. X *                         All Rights Reserved
  669. X *
  670. X * Permission to use, copy, modify, and distribute this software and its
  671. X * documentation for any purpose and without fee is hereby granted,
  672. X * provided that the above copyright notice appear in all copies and that
  673. X * both that copyright notice and this permission notice appear in
  674. X * supporting documentation, and that the name of Digital Equipment
  675. X * Corporation not be used in advertising or publicity pertaining to
  676. X * distribution of the software without specific, written prior permission.
  677. X *
  678. X *
  679. X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  680. X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  681. X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  682. X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  683. X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  684. X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  685. X * SOFTWARE.
  686. X */
  687. X
  688. X/*
  689. X * MODIFICATION HISTORY
  690. X *
  691. X * 000 -- M. Gancarz, DEC Ultrix Engineering Group
  692. X * 001 -- Loretta Guarino Reid, DEC Ultrix Engineering Group,
  693. X * Western Software Lab. Convert to X11.
  694. X * 002 -- Jordan Hubbard, Ardent Computer.
  695. X *  Conversion to awm.
  696. X */
  697. X
  698. X#include "awm.h"
  699. X
  700. XBoolean Lower(window, mask, button, x, y)
  701. XWindow window;                /* Event window. */
  702. Xint mask;                /* Button/key mask. */
  703. Xint button;                /* Button event detail. */
  704. Xint x, y;                /* Event mouse position. */
  705. X{
  706. X     AwmInfoPtr awi;
  707. X     Entry("Lower")
  708. X
  709. X     awi = GetAwmInfo(window);
  710. X     if (!awi)
  711. X      Leave(FALSE)
  712. X     window = awi->frame ? awi->frame : awi->client;
  713. X     /*
  714. X      * If the window is not the root window, lower the window and return.
  715. X      */
  716. X     if (window != RootWindow(dpy, scr))
  717. X      XLowerWindow(dpy, window);
  718. X     Leave(FALSE)
  719. X}
  720. END_OF_awm/Lower.c
  721. if test 2761 -ne `wc -c <awm/Lower.c`; then
  722.     echo shar: \"awm/Lower.c\" unpacked with wrong size!
  723. fi
  724. # end of overwriting check
  725. fi
  726. if test -f awm/Pause.c -a "${1}" != "-c" ; then 
  727.   echo shar: Will not over-write existing file \"awm/Pause.c\"
  728. else
  729. echo shar: Extracting \"awm/Pause.c\" \(2951 characters\)
  730. sed "s/^X//" >awm/Pause.c <<'END_OF_awm/Pause.c'
  731. X#ident   "%W% %G%"
  732. X
  733. X
  734. X
  735. X#ifndef lint
  736. Xstatic char *rcsid_Pause_c = "$Header: Pause.c,v 1.1 88/06/15 15:21:35 jkh Exp $";
  737. X#endif    lint
  738. X
  739. X#include "X11/copyright.h"
  740. X/*
  741. X *
  742. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  743. X *
  744. X * Copyright 1987 by Jordan Hubbard.
  745. X *
  746. X *
  747. X *                         All Rights Reserved
  748. X *
  749. X * Permission to use, copy, modify, and distribute this software and its
  750. X * documentation for any purpose and without fee is hereby granted,
  751. X * provided that the above copyright notice appear in all copies and that
  752. X * both that copyright notice and this permission notice appear in
  753. X * supporting documentation, and that the name of Ardent Computer
  754. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  755. X * pertaining to distribution of the software without specific, written
  756. X * prior permission.
  757. X *
  758. X */
  759. X
  760. X/*
  761. X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  762. X *
  763. X *                         All Rights Reserved
  764. X *
  765. X * Permission to use, copy, modify, and distribute this software and its
  766. X * documentation for any purpose and without fee is hereby granted,
  767. X * provided that the above copyright notice appear in all copies and that
  768. X * both that copyright notice and this permission notice appear in
  769. X * supporting documentation, and that the name of Digital Equipment
  770. X * Corporation not be used in advertising or publicity pertaining to
  771. X * distribution of the software without specific, written prior permission.
  772. X *
  773. X *
  774. X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  775. X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  776. X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  777. X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  778. X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  779. X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  780. X * SOFTWARE.
  781. X */
  782. X
  783. X
  784. X
  785. X/*
  786. X * MODIFICATION HISTORY
  787. X *
  788. X * 000 -- M. Gancarz, DEC Ultrix Engineering Group
  789. X * 001 -- Loretta Guarino Reid, DEC Ultrix Engineering Group,
  790. X *  Western Software Lab. Convert to X11.
  791. X * 002 -- Jordan Hubbard, Ardent Computer
  792. X *  Changes for awm.
  793. X */
  794. X
  795. X#include "awm.h"
  796. X
  797. XBoolean Pause(window, mask, button, x, y)
  798. XWindow window;                          /* Event window. */
  799. Xint mask;                               /* Button/key mask. */
  800. Xint button;                           /* Button event detail. */
  801. Xint x, y;                               /* Event mouse position. */
  802. X{
  803. X    Entry("Pause")
  804. X
  805. X    XGrabServer(dpy);
  806. X    Leave(FALSE)
  807. X}
  808. X
  809. XBoolean Continue(window, mask, button, x, y)
  810. XWindow window;                          /* Event window. */
  811. Xint mask;                               /* Button/key mask. */
  812. Xint button;                           /* Button event detail. */
  813. Xint x, y;                               /* Event mouse position. */
  814. X{
  815. X    Entry("Continue")
  816. X
  817. X    XUngrabServer(dpy);
  818. X    Leave(FALSE)
  819. X}
  820. END_OF_awm/Pause.c
  821. if test 2951 -ne `wc -c <awm/Pause.c`; then
  822.     echo shar: \"awm/Pause.c\" unpacked with wrong size!
  823. fi
  824. # end of overwriting check
  825. fi
  826. if test -f awm/XError.c -a "${1}" != "-c" ; then 
  827.   echo shar: Will not over-write existing file \"awm/XError.c\"
  828. else
  829. echo shar: Extracting \"awm/XError.c\" \(2658 characters\)
  830. sed "s/^X//" >awm/XError.c <<'END_OF_awm/XError.c'
  831. X#ident   "%W% %G%"
  832. X
  833. X
  834. X
  835. X#ifndef lint
  836. Xstatic char *rcsid_XError_c = "$Header: XError.c,v 1.1 88/06/15 15:21:49 jk Exp $";
  837. X#endif    lint
  838. X
  839. X#include "X11/copyright.h"
  840. X/*
  841. X *
  842. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  843. X *
  844. X * Copyright 1987 by Jordan Hubbard.
  845. X *
  846. X *
  847. X *                         All Rights Reserved
  848. X *
  849. X * Permission to use, copy, modify, and distribute this software and its
  850. X * documentation for any purpose and without fee is hereby granted,
  851. X * provided that the above copyright notice appear in all copies and that
  852. X * both that copyright notice and this permission notice appear in
  853. X * supporting documentation, and that the name of Ardent Computer
  854. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  855. X * pertaining to distribution of the software without specific, written
  856. X * prior permission.
  857. X *
  858. X */
  859. X
  860. X/*
  861. X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  862. X *
  863. X *                         All Rights Reserved
  864. X *
  865. X * Permission to use, copy, modify, and distribute this software and its
  866. X * documentation for any purpose and without fee is hereby granted,
  867. X * provided that the above copyright notice appear in all copies and that
  868. X * both that copyright notice and this permission notice appear in
  869. X * supporting documentation, and that the name of Digital Equipment
  870. X * Corporation not be used in advertising or publicity pertaining to
  871. X * distribution of the software without specific, written prior permission.
  872. X *
  873. X *
  874. X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  875. X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  876. X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  877. X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  878. X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  879. X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  880. X * SOFTWARE.
  881. X */
  882. X
  883. X
  884. X/*
  885. X * MODIFICATION HISTORY
  886. X *
  887. X * 000 -- M. Gancarz, DEC Ultrix Engineering Group
  888. X */
  889. X
  890. X#include "awm.h"
  891. X
  892. XXError(dpy, rep)
  893. XDisplay *dpy;
  894. XXErrorEvent *rep;
  895. X{
  896. X#ifdef DEBUG
  897. X    char buffer[BUFSIZ];
  898. X    XGetErrorText(dpy, rep->error_code, buffer, BUFSIZ);
  899. X    fprintf(stderr, "awm: X error occurred during a awm operation.\n");
  900. X    fprintf(stderr, "     Description: '%s'\n", buffer);
  901. X    fprintf(stderr, "     Request code: %d\n", rep->request_code);
  902. X    fprintf(stderr, "     Request function: %d\n", rep->func);
  903. X    fprintf(stderr, "     Request window 0x%x\n", rep->window);
  904. X    fprintf(stderr, "     Error Serial #%d\n", rep->serial);
  905. X    fprintf(stderr, "     Current serial #%d\n", dpy->request);
  906. X#endif
  907. X}
  908. END_OF_awm/XError.c
  909. if test 2658 -ne `wc -c <awm/XError.c`; then
  910.     echo shar: \"awm/XError.c\" unpacked with wrong size!
  911. fi
  912. # end of overwriting check
  913. fi
  914. if test -f awm/bitmaps/twm.twm.bm -a "${1}" != "-c" ; then 
  915.   echo shar: Will not over-write existing file \"awm/bitmaps/twm.twm.bm\"
  916. else
  917. echo shar: Extracting \"awm/bitmaps/twm.twm.bm\" \(2556 characters\)
  918. sed "s/^X//" >awm/bitmaps/twm.twm.bm <<'END_OF_awm/bitmaps/twm.twm.bm'
  919. X/*****************************************************************************/
  920. X/**       Copyright 1988 by Evans & Sutherland Computer Corporation,        **/
  921. X/**                          Salt Lake City, Utah                           **/
  922. X/**                                                                         **/
  923. X/**                           All Rights Reserved                           **/
  924. X/**                                                                         **/
  925. X/**    Permission to use, copy, modify, and distribute this software and    **/
  926. X/**    its documentation  for  any  purpose  and  without  fee is hereby    **/
  927. X/**    granted, provided that the above copyright notice appear  in  all    **/
  928. X/**    copies and that both  that  copyright  notice  and  this  permis-    **/
  929. X/**    sion  notice appear in supporting  documentation,  and  that  the    **/
  930. X/**    name  of Evans & Sutherland  not be used in advertising or publi-    **/
  931. X/**    city pertaining to distribution  of the software without  specif-    **/
  932. X/**    ic, written prior permission.                                        **/
  933. X/**                                                                         **/
  934. X/**    EVANS  & SUTHERLAND  DISCLAIMS  ALL  WARRANTIES  WITH  REGARD  TO    **/
  935. X/**    THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILI-    **/
  936. X/**    TY AND FITNESS, IN NO EVENT SHALL EVANS &  SUTHERLAND  BE  LIABLE    **/
  937. X/**    FOR  ANY  SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY  DAM-    **/
  938. X/**    AGES  WHATSOEVER RESULTING FROM  LOSS OF USE,  DATA  OR  PROFITS,    **/
  939. X/**    WHETHER   IN  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS    **/
  940. X/**    ACTION, ARISING OUT OF OR IN  CONNECTION  WITH  THE  USE  OR PER-    **/
  941. X/**    FORMANCE OF THIS SOFTWARE.                                           **/
  942. X/*****************************************************************************/
  943. X
  944. X#define twm_width 48
  945. X#define twm_height 15
  946. Xstatic char twm_bits[] = {
  947. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x0f,
  948. X   0xfe, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00,
  949. X   0xc0, 0x0c, 0x0c, 0xcc, 0xc0, 0x00, 0xc0, 0x0c, 0x0c, 0xcc, 0xc0, 0x00,
  950. X   0x60, 0x18, 0x1e, 0xe6, 0xe1, 0x01, 0x60, 0x18, 0x1e, 0xe6, 0xe1, 0x01,
  951. X   0x30, 0x30, 0x33, 0x33, 0x33, 0x03, 0x30, 0x30, 0x33, 0x33, 0x33, 0x03,
  952. X   0x18, 0xe0, 0xe1, 0x19, 0x1e, 0x06, 0x18, 0xe0, 0xe1, 0x19, 0x1e, 0x06,
  953. X   0x0c, 0xc0, 0xc0, 0x0c, 0x0c, 0x0c, 0x0c, 0xc0, 0xc0, 0x0c, 0x0c, 0x0c,
  954. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  955. END_OF_awm/bitmaps/twm.twm.bm
  956. if test 2556 -ne `wc -c <awm/bitmaps/twm.twm.bm`; then
  957.     echo shar: \"awm/bitmaps/twm.twm.bm\" unpacked with wrong size!
  958. fi
  959. # end of overwriting check
  960. fi
  961. if test -f awm/errHndlr.c -a "${1}" != "-c" ; then 
  962.   echo shar: Will not over-write existing file \"awm/errHndlr.c\"
  963. else
  964. echo shar: Extracting \"awm/errHndlr.c\" \(2539 characters\)
  965. sed "s/^X//" >awm/errHndlr.c <<'END_OF_awm/errHndlr.c'
  966. X#ident   "%W% %G%"
  967. X
  968. X#ifndef lint
  969. Xstatic char *rcsid_errHndlr_c = "$Header: errHndlr.c,v 1.1 88/06/15 15:26 :00 jkh Exp $";
  970. X#endif  lint
  971. X
  972. X#include "X11/copyright.h"
  973. X/*
  974. X *
  975. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  976. X *
  977. X * Copyright 1987 by Jordan Hubbard.
  978. X *
  979. X *
  980. X *                         All Rights Reserved
  981. X *
  982. X * Permission to use, copy, modify, and distribute this software and its
  983. X * documentation for any purpose and without fee is hereby granted,
  984. X * provided that the above copyright notice appear in all copies and that
  985. X * both that copyright notice and this permission notice appear in
  986. X * supporting documentation, and that the name of Ardent Computer
  987. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  988. X * pertaining to distribution of the software without specific, written
  989. X * prior permission.
  990. X *
  991. X */
  992. X
  993. X#include <stdio.h>
  994. X#include "X11/Xlib.h"
  995. X
  996. Xint errorStatus = False;
  997. X
  998. X#ifdef DEBUG
  999. Xvoid debug(s, x1, x2, x3, x4, x5, x6, x7, x8)
  1000. Xchar *s;
  1001. Xlong x1, x2, x3, x4, x5, x6, x7, x8;
  1002. X{
  1003. X    static FILE *con = 0;
  1004. X
  1005. X    if (!con)
  1006. X        con = fopen("/dev/console", "w");
  1007. X    fprintf(con, s, x1, x2, x3, x4, x5, x6, x7, x8);
  1008. X}
  1009. X#endif
  1010. X
  1011. Xint ErrorHandler (dpy, event)
  1012. X    Display *dpy;
  1013. X    XErrorEvent *event;
  1014. X{
  1015. X#ifdef DEBUG
  1016. X    char *buffer[BUFSIZ];
  1017. X    XGetErrorText(dpy, event->error_code, buffer, BUFSIZ);
  1018. X    (void) debug("Hey!\n");
  1019. X    (void) debug("X Error: %s\n", buffer);
  1020. X    (void) debug("  Request Major code: %d\n", event->request_code);
  1021. X    (void) debug("  Request Minor code: %d\n", event->minor_code);
  1022. X    (void) debug("  ResourceId 0x%x\n", event->resourceid);
  1023. X    (void) debug("  Error Serial #%d\n", event->serial);
  1024. X    (void) debug("  Current Serial #%d\n", dpy->request);
  1025. X#endif
  1026. X    errorStatus = True;
  1027. X    return 0;
  1028. X}
  1029. X
  1030. Xstatic char *eventname[] = {
  1031. X    "zero",
  1032. X    "one",
  1033. X    "KeyPress",
  1034. X    "KeyRelease",
  1035. X    "ButtonPress",
  1036. X    "ButtonRelease",
  1037. X    "MotionNotify",
  1038. X    "EnterNotify",
  1039. X    "LeaveNotify",
  1040. X    "FocusIn",
  1041. X    "FocusOut",
  1042. X    "KeymapNotify",
  1043. X    "Expose",
  1044. X    "GraphicsExpose",
  1045. X    "NoExpose",
  1046. X    "VisibilityNotify",
  1047. X    "CreateNotify",
  1048. X    "DestroyNotify",
  1049. X    "UnmapNotify",
  1050. X    "MapNotify",
  1051. X    "MapRequest",
  1052. X    "ReparentNotify",
  1053. X    "ConfigureNotify",
  1054. X    "ConfigureRequest",
  1055. X    "GravityNotify",
  1056. X    "ResizeRequest",
  1057. X    "CirculateNotify",
  1058. X    "CirculateRequest",
  1059. X    "PropertyNotify",
  1060. X    "SelectionClear",
  1061. X    "SelectionRequest",
  1062. X    "SelectionNotify",
  1063. X    "ColormapNotify",
  1064. X    "ClientMessage",
  1065. X    "MappingNotify",
  1066. X};
  1067. X
  1068. Xvoid print_event_info(s, ev)
  1069. Xchar *s;
  1070. XXEvent *ev;
  1071. X{
  1072. X    fprintf(stderr, "%s: EVENT %s(%d) on %x\n", s, eventname[ev->type],
  1073. X      ev->type, ev->xany.window);
  1074. X}
  1075. END_OF_awm/errHndlr.c
  1076. if test 2539 -ne `wc -c <awm/errHndlr.c`; then
  1077.     echo shar: \"awm/errHndlr.c\" unpacked with wrong size!
  1078. fi
  1079. # end of overwriting check
  1080. fi
  1081. if test -f awm/exp_path.c -a "${1}" != "-c" ; then 
  1082.   echo shar: Will not over-write existing file \"awm/exp_path.c\"
  1083. else
  1084. echo shar: Extracting \"awm/exp_path.c\" \(3455 characters\)
  1085. sed "s/^X//" >awm/exp_path.c <<'END_OF_awm/exp_path.c'
  1086. X#ident   "%W% %G%"
  1087. X
  1088. X
  1089. X
  1090. X#ifndef lint
  1091. Xstatic char *rcsid_exp_path_c = "$Header: exp_path.c,v 1.2 88/06/15 15:26:00 jkh Exp $";
  1092. X#endif  lint
  1093. X
  1094. X#include "X11/copyright.h"
  1095. X/*
  1096. X *
  1097. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  1098. X *
  1099. X * Copyright 1987 by Jordan Hubbard.
  1100. X *
  1101. X *
  1102. X *                         All Rights Reserved
  1103. X *
  1104. X * Permission to use, copy, modify, and distribute this software and its
  1105. X * documentation for any purpose and without fee is hereby granted,
  1106. X * provided that the above copyright notice appear in all copies and that
  1107. X * both that copyright notice and this permission notice appear in
  1108. X * supporting documentation, and that the name of Ardent Computer
  1109. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  1110. X * pertaining to distribution of the software without specific, written
  1111. X * prior permission.
  1112. X *
  1113. X */
  1114. X
  1115. X#include <pwd.h>
  1116. X#include <stdio.h>
  1117. X#if defined(vax)
  1118. X#include <sys/file.h>
  1119. X#else
  1120. X#include <fcntl.h>
  1121. X#endif /* vax */
  1122. X#include "awm.h"
  1123. X
  1124. X/*
  1125. X * WARNING: This code is obscure.
  1126. X * Modify at your Own Risk.
  1127. X */
  1128. Xchar *expand_file(s)
  1129. Xregister char *s;
  1130. X{
  1131. X     static char tmp[256], *cp, err[80];
  1132. X
  1133. X     Entry("expand_file")
  1134. X     
  1135. X     /* zero tmp */
  1136. X     tmp[0] = 0;
  1137. X     if (*s == '/')
  1138. X      Leave(s)
  1139. X     if (*s == '~') {
  1140. X      if (s[1] == '/') { /* It's $HOME */
  1141. X           if (!(cp = (char *)getenv("HOME"))) {
  1142. X            sprintf(err, "expand: Can't find $HOME!\n");
  1143. X            yywarn(err);
  1144. X            Leave(0)
  1145. X           }
  1146. X           strcpy(tmp, cp);
  1147. X           strcat(tmp, s + 1);
  1148. X           Leave(tmp)
  1149. X      }
  1150. X      else { /* it's another user */
  1151. X           struct passwd *pwd;
  1152. X           char uname[32];
  1153. X           int i;
  1154. X
  1155. X           for (i = 1; s[i] != '/'; i++)
  1156. X            uname[i - 1] = s[i];
  1157. X           uname[i] = '\0';
  1158. X           pwd = getpwnam(uname);
  1159. X           if (!pwd) {
  1160. X            sprintf(err, "expand: user '%s' not found.\n", uname);
  1161. X            yywarn(err);
  1162. X            Leave(0)
  1163. X           }
  1164. X           strcpy(tmp, pwd->pw_dir);
  1165. X           strcat(tmp, s + i);
  1166. X           Leave(tmp)
  1167. X      }
  1168. X     }
  1169. X     else
  1170. X      Leave(s)
  1171. X}
  1172. X
  1173. Xchar *deblank(s)
  1174. Xregister char *s;
  1175. X{
  1176. X     Entry("deblank")
  1177. X
  1178. X     if (!s)
  1179. X      Leave(s)
  1180. X     while (*s && (*s == ' ' || *s == '\t'))
  1181. X      s++;
  1182. X     Leave(s)
  1183. X}
  1184. X
  1185. Xchar *expand_from_path(s)
  1186. Xregister char *s;
  1187. X{
  1188. X     char tmp[256], *tm;
  1189. X     int i, plen;
  1190. X
  1191. X     Entry("expand_from_path")
  1192. X
  1193. X     tmp[0] = '\0';
  1194. X     s = deblank(s);
  1195. X     if (!s || !*s)
  1196. X      Leave(0)
  1197. X     s = expand_file(s);
  1198. X     if (!s)
  1199. X      Leave(0)
  1200. X     if (!access(s, R_OK))
  1201. X      Leave(s)
  1202. X     /*
  1203. X      * If it starts with a slash, we know it either expanded and couldn't
  1204. X      * be found, or that it started with a slash in the first place and
  1205. X      * just plain couldn't be found.
  1206. X      */
  1207. X     if (*s == '/')
  1208. X      Leave(0)
  1209. X     /*
  1210. X      * At this stage we haven't found the file by name, so it's time to
  1211. X      * search the path.
  1212. X      */
  1213. X     if (!awmPath || !*awmPath)
  1214. X      Leave(0)
  1215. X     plen = strlen(awmPath);
  1216. X     i = 0;
  1217. X     while (1) {
  1218. X      int p, l;
  1219. X      
  1220. X      tmp[0] = '\0';
  1221. X      while (i < plen && awmPath[i] == ' ' || awmPath[i] == '\t')
  1222. X           i++;
  1223. X      for (p = i; p < plen && awmPath[p] != ' ' && awmPath[p] != '\t'; p++)
  1224. X           tmp[p - i] = awmPath[p];
  1225. X      if (!*tmp)
  1226. X           Leave(0)
  1227. X      tmp[p - i] = '\0';
  1228. X      i = p;
  1229. X      tm = expand_file(tmp);
  1230. X      if (!tm || !*tm)
  1231. X           continue;
  1232. X      l = strlen(tm);
  1233. X      if (l < 1)
  1234. X           continue;
  1235. X      if (tm[l - 1] != '/') { /* append / if necessary */
  1236. X           tm[l] = '/';
  1237. X           tm[++l] = '\0';
  1238. X      }
  1239. X      strcat(tm, s);
  1240. X      if (!access(tm, R_OK))
  1241. X           Leave(tm)
  1242. X     }
  1243. X}
  1244. END_OF_awm/exp_path.c
  1245. if test 3455 -ne `wc -c <awm/exp_path.c`; then
  1246.     echo shar: \"awm/exp_path.c\" unpacked with wrong size!
  1247. fi
  1248. # end of overwriting check
  1249. fi
  1250. if test -f awm/lex.l -a "${1}" != "-c" ; then 
  1251.   echo shar: Will not over-write existing file \"awm/lex.l\"
  1252. else
  1253. echo shar: Extracting \"awm/lex.l\" \(2288 characters\)
  1254. sed "s/^X//" >awm/lex.l <<'END_OF_awm/lex.l'
  1255. X%{
  1256. X
  1257. X
  1258. X#include <X11/copyright.h>
  1259. X
  1260. X#ident   "%W% %G%"
  1261. X
  1262. X/*
  1263. X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  1264. X *
  1265. X *                         All Rights Reserved
  1266. X *
  1267. X * Permission to use, copy, modify, and distribute this software and its
  1268. X * documentation for any purpose and without fee is hereby granted,
  1269. X * provided that the above copyright notice appear in all copies and that
  1270. X * both that copyright notice and this permission notice appear in
  1271. X * supporting documentation, and that the name of Digital Equipment
  1272. X * Corporation not be used in advertising or publicity pertaining to
  1273. X * distribution of the software without specific, written prior permission.
  1274. X *
  1275. X *
  1276. X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  1277. X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  1278. X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  1279. X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  1280. X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  1281. X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  1282. X * SOFTWARE.
  1283. X */
  1284. X
  1285. X
  1286. X
  1287. X/*
  1288. X * MODIFICATION HISTORY
  1289. X *
  1290. X * 000 -- M. Gancarz, DEC Ultrix Engineering Group
  1291. X * 001 -- Jordan Hubbard, Ardent Computer
  1292. X *  Handle comments differently.
  1293. X */
  1294. X
  1295. X#include "y.tab.h"
  1296. X#include "awm.h"
  1297. X
  1298. X#undef    YYLMAX
  1299. X
  1300. X#ifdef    LEXBUFSIZ
  1301. X#define YYLMAX    LEXBUFSIZ
  1302. X#else
  1303. X#define YYLMAX    1024
  1304. X#endif
  1305. X
  1306. Xchar *dequote();
  1307. Xchar *stash();
  1308. X
  1309. X%}
  1310. XW    [ \t]+
  1311. X%%
  1312. X
  1313. X#.*\n                { return(COMMENT); }    /* Comments. */
  1314. X\\\n                { Lineno++; }        /* Continuation. */
  1315. X{W}                { ; }    /* Whitespace. */
  1316. X[^ \"\t\n#=\^\!\|\(\)\[\]\{\}:;]+    { yylval.sval=stash(yytext);return(STRING); }
  1317. X\"[^\"]*\"            { yylval.sval=stash(dequote(yytext));
  1318. X                  return(STRING); }
  1319. X\n                { return(NL); }
  1320. X.                { return(*yytext); }
  1321. X
  1322. X%%
  1323. X
  1324. X/*
  1325. X * Remove the quotes enclosing a quoted string.
  1326. X */
  1327. Xchar *
  1328. Xdequote(s)
  1329. Xchar *s;
  1330. X{
  1331. X    char *p;
  1332. X
  1333. X    ++s;
  1334. X    p = rindex(s, '"');
  1335. X    *p = '\0';
  1336. X    return(s);
  1337. X}
  1338. X
  1339. X/*
  1340. X * Save string away in memory and return a pointer to it.  If
  1341. X * no space could be found, quit with a fatal error.
  1342. X */
  1343. Xchar *stash(s)
  1344. Xchar *s;
  1345. X{
  1346. X    char *ptr;
  1347. X    char *malloc();
  1348. X
  1349. X    ptr = malloc(strlen(s) + 1);
  1350. X    if (ptr == NULL) {
  1351. X        Error("out of space");
  1352. X    }
  1353. X    return(strcpy(ptr, s));
  1354. X}
  1355. END_OF_awm/lex.l
  1356. if test 2288 -ne `wc -c <awm/lex.l`; then
  1357.     echo shar: \"awm/lex.l\" unpacked with wrong size!
  1358. fi
  1359. # end of overwriting check
  1360. fi
  1361. if test -f awm/menus/eventsave.c -a "${1}" != "-c" ; then 
  1362.   echo shar: Will not over-write existing file \"awm/menus/eventsave.c\"
  1363. else
  1364. echo shar: Extracting \"awm/menus/eventsave.c\" \(3619 characters\)
  1365. sed "s/^X//" >awm/menus/eventsave.c <<'END_OF_awm/menus/eventsave.c'
  1366. X#ident   "%W% %G%"
  1367. X
  1368. X#ifndef lint
  1369. Xstatic char sccs_id[] = "@(#)eventsave.c    2.1 12/16/87  Siemens Corporate Research and Support, Inc.";
  1370. X#endif
  1371. X
  1372. X
  1373. X/* 
  1374. X  RTL Menu Package Version 1.0
  1375. X  by Joe Camaratta and Mike Berman, Siemens RTL, Princeton NJ, 1987
  1376. X
  1377. X  eventsave.c: saves/restores the X event queue
  1378. X*/
  1379. X
  1380. X#include "X11/copyright.h"
  1381. X/*
  1382. X *
  1383. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  1384. X *
  1385. X * Copyright 1987 by Jordan Hubbard.
  1386. X *
  1387. X *
  1388. X *                         All Rights Reserved
  1389. X *
  1390. X * Permission to use, copy, modify, and distribute this software and its
  1391. X * documentation for any purpose and without fee is hereby granted,
  1392. X * provided that the above copyright notice appear in all copies and that
  1393. X * both that copyright notice and this permission notice appear in
  1394. X * supporting documentation, and that the name of Ardent Computer
  1395. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  1396. X * pertaining to distribution of the software without specific, written
  1397. X * prior permission.
  1398. X *
  1399. X */
  1400. X
  1401. X/*
  1402. X
  1403. XCopyright 1987 by
  1404. X    Siemens Corporate Research and Support, Inc., Princeton, New Jersey
  1405. X
  1406. XPermission to use, copy, modify, and distribute this software
  1407. Xand its documentation for any purpose and without fee is
  1408. Xhereby granted, provided that the above copyright notice
  1409. Xappear in all copies and that both that copyright notice and
  1410. Xthis permission notice appear in supporting documentation, and
  1411. Xthat the name of Siemens not be used in advertising or
  1412. Xpublicity pertaining to distribution of the software without
  1413. Xspecific, written prior permission.  Siemens makes no
  1414. Xrepresentations about the suitability of this software for any
  1415. Xpurpose.  It is provided "as is" without express or implied
  1416. Xwarranty.
  1417. X
  1418. X*/
  1419. X
  1420. X#include <stdio.h>
  1421. X#include "dbug.h"
  1422. X#include "X11/Xlib.h"
  1423. X
  1424. X#include "eventstack.h"
  1425. X
  1426. X
  1427. Xvoid SaveEvents(display, Stack, mask)
  1428. X    Display *display;
  1429. X    struct Ev_q **Stack;
  1430. X    unsigned long mask;     /* Save only events that match mask; */
  1431. X             /* others remain on the event queue  */
  1432. X{
  1433. X    XEvent ev;
  1434. X    int Match = 1;
  1435. X
  1436. X    Entry("SaveEvents")
  1437. X
  1438. X    while (XPending(display) && Match)
  1439. X    {
  1440. X    if (XCheckMaskEvent(display, mask, &ev))
  1441. X    {
  1442. X        DBUG_3("SaveEvents","Saving event type %d\n",ev.type);
  1443. X        PushEvent(&ev, Stack);
  1444. X    }
  1445. X    else
  1446. X        Match = False;
  1447. X    }
  1448. X    Leave_void
  1449. X}
  1450. X
  1451. Xvoid RestoreEvents(display, Stack)
  1452. X    Display *display;
  1453. X    struct Ev_q **Stack;    /* pointer to stack containing saved events */
  1454. X{
  1455. X    XEvent ev, *tmp;
  1456. X
  1457. X    Entry("RestoreEvents")
  1458. X    
  1459. X    while (!EventStackIsEmpty(Stack))
  1460. X    {
  1461. X    bcopy(&ev, tmp = PopEvent(Stack), sizeof(XEvent));
  1462. X    XPutBackEvent(display, &ev);
  1463. X    free(tmp);
  1464. X    }
  1465. X    XFlush(display);
  1466. X    Leave_void
  1467. X}
  1468. X
  1469. Xvoid DisposeEvents(display, mask)
  1470. X    Display *display;
  1471. X    unsigned long mask;     /* dispose events that match mask */
  1472. X{
  1473. X    int Match = 1;
  1474. X    XEvent ev;
  1475. X    
  1476. X    Entry("DisposeEvents")
  1477. X
  1478. X    while (XPending(display) && Match)
  1479. X    {
  1480. X    if (XCheckMaskEvent(display, mask, &ev))
  1481. X    {
  1482. X        DBUG_3("SaveEvents","Disposing event type %d\n",ev);
  1483. X    }
  1484. X    else
  1485. X        Match = False;
  1486. X    }
  1487. X    Leave_void
  1488. X}
  1489. X    
  1490. Xvoid DiscardEventStore(Stack)
  1491. X    struct Ev_q **Stack;
  1492. X{
  1493. X    Entry("DiscardEventStack")
  1494. X    
  1495. X    while (!EventStackIsEmpty(Stack))
  1496. X    {
  1497. X    (void) free(PopEvent(Stack));
  1498. X    }
  1499. X    Leave_void
  1500. X}
  1501. X
  1502. Xvoid AddEventToStore(Stack, ev)
  1503. X    struct Ev_q **Stack;
  1504. X    XEvent ev;
  1505. X{
  1506. X    Entry("AddEventToStore")
  1507. X
  1508. X    PushEvent(&ev, Stack);
  1509. X    Leave_void
  1510. X}
  1511. X
  1512. X
  1513. Xvoid RemoveEventFromStore(Stack, ev)
  1514. X    struct Ev_q **Stack;
  1515. X    XEvent *ev;
  1516. X{
  1517. X     XEvent *tmp;
  1518. X     Entry("RemoveEventFromStore")
  1519. X
  1520. X    bcopy(ev, tmp = PopEvent(Stack), sizeof(XEvent));
  1521. X    free(tmp);
  1522. X    Leave_void
  1523. X}
  1524. END_OF_awm/menus/eventsave.c
  1525. if test 3619 -ne `wc -c <awm/menus/eventsave.c`; then
  1526.     echo shar: \"awm/menus/eventsave.c\" unpacked with wrong size!
  1527. fi
  1528. # end of overwriting check
  1529. fi
  1530. if test -f awm/menus/eventstack.c -a "${1}" != "-c" ; then 
  1531.   echo shar: Will not over-write existing file \"awm/menus/eventstack.c\"
  1532. else
  1533. echo shar: Extracting \"awm/menus/eventstack.c\" \(2655 characters\)
  1534. sed "s/^X//" >awm/menus/eventstack.c <<'END_OF_awm/menus/eventstack.c'
  1535. X#ident   "%W% %G%"
  1536. X
  1537. X#ifndef lint
  1538. X     static char sccs_id[] = "@(#)eventstack.c    2.1 12/16/87  Siemens Corporate Research and Support, Inc.";
  1539. X#endif
  1540. X
  1541. X
  1542. X/* 
  1543. X  RTL Menu Package Version 1.0
  1544. X  by Joe Camaratta and Mike Berman, Siemens RTL, Princeton NJ, 1987
  1545. X  
  1546. X  eventstack.c: stack implementation for X events
  1547. X  */
  1548. X
  1549. X#include "X11/copyright.h"
  1550. X/*
  1551. X *
  1552. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  1553. X *
  1554. X * Copyright 1987 by Jordan Hubbard.
  1555. X *
  1556. X *
  1557. X *                         All Rights Reserved
  1558. X *
  1559. X * Permission to use, copy, modify, and distribute this software and its
  1560. X * documentation for any purpose and without fee is hereby granted,
  1561. X * provided that the above copyright notice appear in all copies and that
  1562. X * both that copyright notice and this permission notice appear in
  1563. X * supporting documentation, and that the name of Ardent Computer
  1564. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  1565. X * pertaining to distribution of the software without specific, written
  1566. X * prior permission.
  1567. X *
  1568. X */
  1569. X
  1570. X/*
  1571. X  
  1572. X  Copyright 1987 by
  1573. X  Siemens Corporate Research and Support, Inc., Princeton, New Jersey
  1574. X  
  1575. X  Permission to use, copy, modify, and distribute this software
  1576. X  and its documentation for any purpose and without fee is
  1577. X  hereby granted, provided that the above copyright notice
  1578. X  appear in all copies and that both that copyright notice and
  1579. X  this permission notice appear in supporting documentation, and
  1580. X  that the name of Siemens not be used in advertising or
  1581. X  publicity pertaining to distribution of the software without
  1582. X  specific, written prior permission.  Siemens makes no
  1583. X  representations about the suitability of this software for any
  1584. X  purpose.  It is provided "as is" without express or implied
  1585. X  warranty.
  1586. X  
  1587. X  Almost totally re-written by Jordan Hubbard, Ardent computer corp.
  1588. X  Previous code did not pass more strict compilers.
  1589. X  */
  1590. X
  1591. X#include <stdio.h>
  1592. X#include "dbug.h"
  1593. X#include "X11/Xlib.h"
  1594. X#include "eventstack.h"
  1595. X
  1596. Xextern char *malloc();
  1597. X
  1598. Xvoid PushEvent(event, Eq)
  1599. XXEvent *event;
  1600. Xstruct Ev_q **Eq;
  1601. X{
  1602. X     struct Ev_q *ptr;
  1603. X     Entry("PushEvent")
  1604. X     
  1605. X     if (!*Eq) {
  1606. X      *Eq = ptr = (struct Ev_q *)malloc(sizeof(struct Ev_q));
  1607. X      ptr->prev = 0;
  1608. X     }
  1609. X     else {
  1610. X      ptr = (struct Ev_q *)malloc(sizeof(struct Ev_q));
  1611. X      ptr->prev = *Eq;
  1612. X      *Eq = ptr;
  1613. X     }
  1614. X     ptr->event = (XEvent *)malloc(sizeof(XEvent));
  1615. X     bcopy(ptr->event, event, sizeof(XEvent));
  1616. X     Leave_void
  1617. X}
  1618. X
  1619. XXEvent *PopEvent(Eq)
  1620. Xstruct Ev_q **Eq;
  1621. X{
  1622. X     struct Ev_q *ptr;
  1623. X     
  1624. X     Entry("PopEvent")
  1625. X
  1626. X     if (*Eq) {
  1627. X      ptr = *Eq;
  1628. X      *Eq = ptr->prev;
  1629. X      free(ptr);
  1630. X      Leave(ptr->event)
  1631. X     }
  1632. X     else
  1633. X      Leave((XEvent *)0)
  1634. X}
  1635. END_OF_awm/menus/eventstack.c
  1636. if test 2655 -ne `wc -c <awm/menus/eventstack.c`; then
  1637.     echo shar: \"awm/menus/eventstack.c\" unpacked with wrong size!
  1638. fi
  1639. # end of overwriting check
  1640. fi
  1641. if test -f awm/menus/rtlmnu.ext.h -a "${1}" != "-c" ; then 
  1642.   echo shar: Will not over-write existing file \"awm/menus/rtlmnu.ext.h\"
  1643. else
  1644. echo shar: Extracting \"awm/menus/rtlmnu.ext.h\" \(2319 characters\)
  1645. sed "s/^X//" >awm/menus/rtlmnu.ext.h <<'END_OF_awm/menus/rtlmnu.ext.h'
  1646. X#ident   "%W% %G%"
  1647. X
  1648. X/*
  1649. X#ifndef lint
  1650. Xstatic char sccs_id[] = "@(#)rtlmenu.extern.h    2.1 12/16/87  Siemens Corporate Research and Support, Inc.";
  1651. X#endif
  1652. X*/
  1653. X
  1654. X
  1655. X/* 
  1656. X  RTL Menu Package Version 1.0
  1657. X  by Joe Camaratta and Mike Berman, Siemens RTL, Princeton NJ, 1987
  1658. X
  1659. X  rtlmenu.extern.h: external definitions for rtlmenu user
  1660. X*/
  1661. X
  1662. X/*
  1663. X *
  1664. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  1665. X *
  1666. X * Copyright 1987 by Jordan Hubbard.
  1667. X *
  1668. X *
  1669. X *                         All Rights Reserved
  1670. X *
  1671. X * Permission to use, copy, modify, and distribute this software and its
  1672. X * documentation for any purpose and without fee is hereby granted,
  1673. X * provided that the above copyright notice appear in all copies and that
  1674. X * both that copyright notice and this permission notice appear in
  1675. X * supporting documentation, and that the name of Ardent Computer
  1676. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  1677. X * pertaining to distribution of the software without specific, written
  1678. X * prior permission.
  1679. X *
  1680. X */
  1681. X
  1682. X/*
  1683. XCopyright 1987 by
  1684. X    Siemens Corporate Research and Support, Inc., Princeton, New Jersey
  1685. X
  1686. XPermission to use, copy, modify, and distribute this software
  1687. Xand its documentation for any purpose and without fee is
  1688. Xhereby granted, provided that the above copyright notice
  1689. Xappear in all copies and that both that copyright notice and
  1690. Xthis permission notice appear in supporting documentation, and
  1691. Xthat the name of Siemens not be used in advertising or
  1692. Xpublicity pertaining to distribution of the software without
  1693. Xspecific, written prior permission.  Siemens makes no
  1694. Xrepresentations about the suitability of this software for any
  1695. Xpurpose.  It is provided "as is" without express or implied
  1696. Xwarranty.
  1697. X
  1698. X*/
  1699. X
  1700. Xextern void RTLMenu_Initialize(), RTLMenu_Destroy(),
  1701. X    RTLMenu_Replace_Data_Keyed_String(), RTLMenu_Activate_Entry(),
  1702. X    RTLMenu_Inactivate_Entry(), RTLMenu_Delete_Entries(),
  1703. X    RTLMenu_Delete_String(), RTLMenu_Delete_Data(),
  1704. X    RTLMenu_Enter(), RTLMenu_Generate_Items();
  1705. X    
  1706. Xextern bool RTLMenu_Has_Data();
  1707. X
  1708. Xextern RTLMenu RTLMenu_Create(), RTLMenu_Get_Submenu();
  1709. X
  1710. Xextern pointer RTLMenu_Data();
  1711. X
  1712. Xextern RTLMenuItem RTLMenu_Append_String(), RTLMenu_Append_Callback(),
  1713. X    RTLMenu_Append_Call(), RTLMenu_Append_Checkback(),
  1714. X    RTLMenu_Append_Submenu();
  1715. X
  1716. Xextern RTLPoint RTLMenu_Entry_Pos(); 
  1717. X    
  1718. END_OF_awm/menus/rtlmnu.ext.h
  1719. if test 2319 -ne `wc -c <awm/menus/rtlmnu.ext.h`; then
  1720.     echo shar: \"awm/menus/rtlmnu.ext.h\" unpacked with wrong size!
  1721. fi
  1722. # end of overwriting check
  1723. fi
  1724. if test -f awm/menus/std_defs.h -a "${1}" != "-c" ; then 
  1725.   echo shar: Will not over-write existing file \"awm/menus/std_defs.h\"
  1726. else
  1727. echo shar: Extracting \"awm/menus/std_defs.h\" \(2359 characters\)
  1728. sed "s/^X//" >awm/menus/std_defs.h <<'END_OF_awm/menus/std_defs.h'
  1729. X#ident   "%W% %G%"
  1730. X
  1731. X/*
  1732. X#ifndef lint
  1733. Xstatic char sccs_id[] = "@(#)std_defs.h    2.5  4/13/87 Copyright (c) 1987, Siemens Corporate Research and Support, Inc.";
  1734. X#endif
  1735. X*/
  1736. X
  1737. X
  1738. X/* 
  1739. X  RTL Menu Package Version 1.0
  1740. X  by Joe Camaratta and Mike Berman, Siemens RTL, Princeton NJ, 1987
  1741. X
  1742. X  std_defs.h: standard definitions shared among menu programs.
  1743. X*/
  1744. X
  1745. X#include "X11/copyright.h"
  1746. X/*
  1747. X *
  1748. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  1749. X *
  1750. X * Copyright 1987 by Jordan Hubbard.
  1751. X *
  1752. X *
  1753. X *                         All Rights Reserved
  1754. X *
  1755. X * Permission to use, copy, modify, and distribute this software and its
  1756. X * documentation for any purpose and without fee is hereby granted,
  1757. X * provided that the above copyright notice appear in all copies and that
  1758. X * both that copyright notice and this permission notice appear in
  1759. X * supporting documentation, and that the name of Ardent Computer
  1760. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  1761. X * pertaining to distribution of the software without specific, written
  1762. X * prior permission.
  1763. X *
  1764. X */
  1765. X
  1766. X/*
  1767. X
  1768. XCopyright 1987 by
  1769. X    Siemens Corporate Research and Support, Inc., Princeton, New Jersey
  1770. X
  1771. XPermission to use, copy, modify, and distribute this
  1772. Xsoftware and its documentation for any purpose and without
  1773. Xfee is hereby granted, provided that the above copyright
  1774. Xnotice appear in all copies and that both that copyright
  1775. Xnotice and this permission notice appear in supporting
  1776. Xdocumentation, and that the name of Siemens not be used in
  1777. Xadvertising or publicity pertaining to distribution of the
  1778. Xsoftware without specific, written prior permission.
  1779. XSiemens makes no representations about the suitability of
  1780. Xthis software for any purpose.  It is provided "as is"
  1781. Xwithout express or implied warranty.
  1782. X
  1783. X*/
  1784. X
  1785. X
  1786. X#define STD_DEFS
  1787. X
  1788. X/*    useful macros
  1789. X */
  1790. Xtypedef char *pointer;
  1791. X
  1792. Xextern char *malloc();
  1793. X#define  allocate(type, quan)    ( (type *) malloc(sizeof(type) * (quan)) )
  1794. X
  1795. X#define  FOREVER        for (;;)
  1796. X
  1797. X
  1798. X/*    initial pointer value
  1799. X */
  1800. X#ifndef  NULL
  1801. X#define  NULL        0
  1802. X#endif
  1803. X
  1804. X/*    values for "bool" type
  1805. X */
  1806. X#define bool    unsigned
  1807. X
  1808. X#ifndef  TRUE
  1809. X#define  TRUE        1
  1810. X#endif
  1811. X
  1812. X#ifndef  FALSE
  1813. X#define  FALSE        0
  1814. X#endif
  1815. X
  1816. X
  1817. X/*    VoidFunc type definition
  1818. X */
  1819. Xtypedef void        (*VoidFunc)();
  1820. X
  1821. X
  1822. X/*    minimal error status return values
  1823. X */
  1824. X#define  SUCCESS     0
  1825. X#define  FAILURE    -1
  1826. X
  1827. X#define ABS(val)  \
  1828. X    ( ( (val) < 0 ) ? -(val) : (val) ) 
  1829. X
  1830. END_OF_awm/menus/std_defs.h
  1831. if test 2359 -ne `wc -c <awm/menus/std_defs.h`; then
  1832.     echo shar: \"awm/menus/std_defs.h\" unpacked with wrong size!
  1833. fi
  1834. # end of overwriting check
  1835. fi
  1836. echo shar: End of archive 2 \(of 13\).
  1837. cp /dev/null ark2isdone
  1838. MISSING=""
  1839. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 ; do
  1840.     if test ! -f ark${I}isdone ; then
  1841.     MISSING="${MISSING} ${I}"
  1842.     fi
  1843. done
  1844. if test "${MISSING}" = "" ; then
  1845.     echo You have unpacked all 13 archives.
  1846.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1847. else
  1848.     echo You still need to unpack the following archives:
  1849.     echo "        " ${MISSING}
  1850. fi
  1851. ##  End of shell archive.
  1852. exit 0
  1853. Mike Wexler(wyse!mikew)    Phone: (408)433-1000 x1330
  1854.